<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>管理员登录页</title>
<link rel="stylesheet" href="/layui/css/layui.css">
</head>
<body>

<form class="layui-form" action="/admin/register" method="post" enctype="multipart/form-data">
		<div class="layui-form-item" align="center">
			<label class="layui-form-label">注册名:</label>
			<div class="layui-input-inline">
				<input type="text" name="name" required lay-verify="required"
					placeholder="注册名" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item" >
			<label class="layui-form-label">密码:</label>
			<div class="layui-input-inline" >
				<input type="password" name="pwd" required
					lay-verify="required" placeholder="密码" autocomplete="off"
					class="layui-input">
			</div>
		</div>
		<div class="layui-form-item" >
			<label class="layui-form-label">上传头像:</label>
			<div class="layui-input-inline" >
				<input type="file" name="upload" lay-ext="jpg|png|gif"
					lay-title="请上传一张图片吧亲" class="layui-upload-file">
			</div>
		</div>
		
		<div class="layui-form-item" >
			<button class="layui-btn" onclick="toLogin()" >登录</button>
			<button class="layui-btn" lay-submit >注册</button>
		</div>
	</form>
<script src="/layui/layui.js"></script>
<script>
layui.use('upload', function(){  //如果只加载一个组件，可以不填数组。如：layui.use('form')
	layui.upload({
		  url: '/admin/register1',
		  success: function(res){
		  // alert(res.cData);
		  }
		});   
});
</script>
</html>